package com.lanou.fooddemo.receiver;

import android.content.Context;

import com.baidu.android.pushservice.PushMessageReceiver;
import com.lanou.fooddemo.dao.FoodDatabaseTool;

import java.util.List;

/**
 * Created by dllo on 2015/8/8.
 */
public class FoodPushReceiver extends PushMessageReceiver {
    @Override
    public void onBind(Context context, int i, String s, String s1, String s2, String s3) {

    }

    @Override
    public void onUnbind(Context context, int i, String s) {

    }

    @Override
    public void onSetTags(Context context, int i, List<String> list, List<String> list1, String s) {

    }

    @Override
    public void onDelTags(Context context, int i, List<String> list, List<String> list1, String s) {

    }

    @Override
    public void onListTags(Context context, int i, List<String> list, String s) {

    }

    @Override
    public void onMessage(Context context, String s, String s1) {

    }

    /**
     * 通知点击处理方法
     * @param context 上下文
     * @param s 标题
     * @param s1 内容
     * @param s2
     */
    @Override
    public void onNotificationClicked(Context context, String s, String s1, String s2) {
        FoodDatabaseTool foodDatabaseTool = new FoodDatabaseTool(context);
        foodDatabaseTool.insertNotice(s, s1);
        foodDatabaseTool.close();
    }

    @Override
    public void onNotificationArrived(Context context, String s, String s1, String s2) {

    }
}
